<?php
/**
 * ccNewsletter
 * @author Chill Creations <info@chillcreations.com>
 * @link http://www.chillcreations.com
 * @license GNU/GPL
**/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');
jimport( 'joomla.application.component.view' );
class ccNewsletterViewImport extends JView
{
	function display($tpl = null)
	{
		JToolBarHelper::title( JText::_( 'CC_NEWSLETTER_TITLE') . ' - ' . JText::_( 'CC_IMPORT'));
		JToolBarHelper::preferences('com_ccnewsletter', '500');
		$acknowledgementrow=& $this->get('Data');
		$database =& JFactory::getDBO();
		$query = "SELECT count(*) FROM #__components WHERE name ='Communicator'";
		$database->setquery($query);
		$communicator = $database->loadResult();
		$query = "SELECT count(*) FROM #__components WHERE name ='Acajoom'";
		$database->setquery($query);
		$acajoom = $database->loadResult();
		$query = "SELECT count(*) FROM #__components WHERE name ='YaNC'";
		$database->setquery($query);
		$yanc = $database->loadResult();
		$query = "SELECT count(*) FROM #__components WHERE name ='Letterman'";
		$database->setquery($query);
		$letterman = $database->loadResult();
		$query = "SELECT count(*) FROM #__components WHERE name ='Vemod News Mailer'";
		$database->setquery($query);
		$vmod = $database->loadResult();
		$totalcomponent = $communicator+$acajoom+$yanc+$letterman+$vmod;
		$this->assignRef('communicator',		$communicator);
		$this->assignRef('acajoom',		$acajoom);
		$this->assignRef('yanc',		$yanc);
		$this->assignRef('letterman',		$letterman);
		$this->assignRef('vmod',		$vmod);
		$this->assignRef('totalcomponent',		$totalcomponent);
		parent::display($tpl);
	}
}
